import config from '@/config'
import store from '@/store'

export default {
  backgroundColor: 'transparent',
  tooltip: {
    formatter: function(val) {
      return '区域总表数:' + val.value[2] + '只'
    }
  },
  visualMap: {
    min: 0,
    max: 29
  },
  bmap: {
    center: store.getters.mapCenter,
    zoom: 14,
    roam: true,
    animation: false,
    mapStyle: {
      styleJson: config.mapStyleJson
    }
  },
  series: [
    {
      type: 'custom',
      coordinateSystem: 'bmap',
      animation: false,
      itemStyle: {
        emphasis: {
          color: 'yellow'
        }
      },
      encode: {
        tooltip: 2
      }
    }
  ]
}
